package cn.yuanqiao.archive.tongji.mapper;

import cn.yuanqiao.archive.appManager.domain.DataScopeBase;
import cn.yuanqiao.archive.appManager.domain.TenantSysDictData;
import cn.yuanqiao.common.annotation.DataScope;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * @author zjj
 * @date 2023/7/28
 */
public interface TongJiMapper {
    List<Map<String,Object>> menlei(@Param("startTime")String startTime, @Param("endTime")String endTime, @Param("tenantCode")String tenantCode);

    List<Long> getDeptListByPraentId(Long deptId);

    List<Map<String, Object>> kucun(@Param("dictData")List<TenantSysDictData> dictData, @Param("startTime")String startTime, @Param("endTime") String endTime,
                                    @Param("depts")List<Long> depts, @Param("tenantCode")String tenantCode);

    List<Map<String, Object>> ysmenlei(String tenantCode);

    List<Map<String, Object>> ysfwl(String tenantCode);

    Map<String, Object> wdjy(@Param("userId")Long userId, @Param("tenantCode")String tenantCode);

    List<Map<String, Object>> getYqdaSubtable(@Param("tenantCode")String tenantCode);

    List<Map<String, Object>> getListResult(@Param("sql")String sql);

    List<Map<String, Object>> symrjyl(@Param("tenantCode")String tenantCode);

    String topAccessTime(@Param("userName")String userName, @Param("tenantCode") String tenantCode);

    Integer tadayCount(@Param("userName")String userName, @Param("tenantCode")String tenantCode);

    Integer getBorrowCountByState(@Param("userId")Long userId, @Param("state") String state, @Param("tenantCode") String tenantCode);

    List<Map<String, Object>> lytj(@Param("startTime")String startTime, @Param("endTime")String endTime, @Param("tenantCode")String tenantCode);

    @DataScope(deptAlias = "a",userAlias = "a",deptColumn = "gdcs_id",userColumn = "create_id")
    Integer getDzjCount(@Param("dataScopeBase") DataScopeBase dataScopeBase, @Param("categoryId")String categoryId, @Param("tenantCode") String tenantCode);

    List<Map<String, Object>> sjlytj(@Param("tableName")String tableName, @Param("subTableName") String subTableName, @Param("startTime")String startTime, @Param("endTime") String endTime);

    List<Map<String, Object>> sjlytjEFile(@Param("efileTableName")String efileTableName, @Param("fileTableName") String fileTableName, @Param("startTime")String startTime, @Param("endTime") String endTime);

    List<Map> fwltj(@Param("data")String data,@Param("format")String format,@Param("tenantCode")String tenantCode);

    Integer getDjsCountByState(@Param("tenantCode") String tenantCode);

    int getwddyCount(@Param("tableName")String tableName,@Param("userId") Long userId);

    Integer getwdxzCount(@Param("tableName")String tableName,@Param("userId") Long userId);

    int getwdscCount(@Param("tableName")String tableName,@Param("userId") Long userId);

    List<Map<String, Object>> getFondsList(@Param("tenantCode") String tenantCode);

    List<Map<String, Object>> getgstjDocType(@Param("efileTableName") String efileTableName, @Param("tenantCode") String tenantCode,
                                             @Param("fileTableName") String fileTableName,@Param("startTime")String startTime,
                                             @Param("endTime")String endTime);

    List<Map<String, Object>> getNdType( @Param("tenantCode") String tenantCode,@Param("startTime")String startTime, @Param("endTime")String endTime,
                                         @Param("subtablename") String subtablename);

    List<Map<String, Object>> getQzType( @Param("tenantCode") String tenantCode,@Param("startTime")String startTime, @Param("endTime")String endTime);

    List<Map<String, Object>> getDagQzType( @Param("tenantCode") String tenantCode,@Param("startTime")String startTime, @Param("endTime")String endTime);

    List<Map<String, Object>> getlymyd( @Param("tenantCode") String tenantCode,@Param("startTime")String startTime, @Param("endTime")String endTime);


}
